
if exists (select name from sysobjects where name like 'sp_ChucVu_DelID')
	drop procedure sp_ChucVu_DelID
go
create proc sp_ChucVu_DelID(@machucvu int, @type int)
as
if(@type = 1)
begin
	begin tran 
	update ChucVu set DelFlg=1 where MaChucVu=@machucvu 
	waitfor delay '00:00:10'	
	rollback
end 
else
begin
	begin tran
		Update ChucVu set DelFlg=1 where MaChucVu=@machucvu
	commit tran
end 
go


